<%@ tag language="java" import="java.util.*" pageEncoding="UTF-8"  isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ attribute name="url" required="true"  type="java.lang.String"%>
<%@ attribute name="bean" required="true"  type="net.jxvtc.eshop.domain.BasePageBean"%>
<style>
/*分页*/
.pagination {
	padding: 5px;
	width: 790px;
	margin: 5px auto;
	text-align: center;
}

.pagination ul {
	width:380px;
	margin: 5px auto;
	padding: 5px;
	font-size: 12px;
}

.pagination li {
	list-style-type: none;
	float:left;
	padding: 1px;
	margin: 1px;
}

.pagination a,.pagination a:visited {
	padding:5px;
	border: 1px solid #9aafe5;
	text-decoration: none;
	color: #2e6ab1;
}



.pagination li.currentpage {
	font-weight: bold;
	padding: 5px;
	border: 1px solid navy;
	background-color: #2e6ab1;
	color: #FFF;
}
.disablepage_a{
	display:block; 
	width:75px; 
	height:15px;
	}
.disablepage_a:link,.disablepage_a:visited{!important; padding:0; border:0;}
.disablepage_a:hover{!important; padding:0; border:0; background:none; }
.pagination li.disablepage_p {
	width: 75px;
	height: 15px;
	padding: 5px;
	color: #929292;
	background:url(../images/previous_page.png) no-repeat center center;
}

.pagination li.disablepage_p2 {
	width: 75px;
	height: 15px;
	padding: 5px;
	color: #929292;
	background:url(../images/previous_page2.png) no-repeat center center;
}

.pagination li.disablepage_n{	
	width: 75px;
	height: 15px;
	padding: 5px;
	color: #929292;
	background:url(../images/next_page.png) no-repeat center center;
}

.pagination li.disablepage_n2{	
	width: 75px;
	height: 15px;
	padding: 5px;
	color: #929292;background:url(../images/next_page2.png) no-repeat center center;
}

.pagination li.nextpage {
	font-weight: bold;
	padding: 5px;
}

/*分页*/
</style>
<div class="pagination">
	<ul>
		<c:if test="${bean.currentPage!=1}">
			<li class="disablepage_p"><a class="disablepage_a"
				href="${url}&page=1"></a>
			</li>
		</c:if>
		<c:if test="${bean.currentPage==1}">
			<li class="disablepage_p2"></li>
		</c:if>
		<c:forEach begin="1" end="${bean.totalPage}" var="pageNum">
			<c:if test="${pageNum==bean.currentPage}">
				<li class="currentpage">${pageNum }</li>
			</c:if>
			<c:if test="${pageNum!=bean.currentPage}">
				<li><a
					href="${url}&page=${pageNum}">${pageNum}</a>
				</li>
			</c:if>
		</c:forEach>

		<c:if test="${bean.currentPage==bean.totalPage||bean.totalPage==0}">
			<li class="disablepage_n2"></li>
		</c:if>
		<c:if test="${bean.currentPage!=bean.totalPage&&bean.totalPage!=0}">
			<li class="disablepage_n"><a class="disablepage_a"
				href="${url}&page=${bean.currentPage+1}"></a>
			</li>
		</c:if>
	</ul>
</div>